package com.peg.rules;

import com.peg.dataobjects.Context;

/**
 * @author sad
 */
public class SequencePush extends Sequence {

    public SequencePush(Rule... rules) {
        super(rules);
    }

    public void EndRule(boolean result, Context context) {
        if (result) {
            context.getStack().Push(context.getMatch());
        }
    }

    @Override
    public String toString() {
        return "SequencePush";
    }
}
